
package com.lzy.mall.common.constant;

/**
 * 常量
 *
 */
public class Constant {
    /**
     * ResultUtil获取Bean
     */
    public static final String R_DATA = "data";

    /**
     * 盐
     */
    public static final String SALT = "!@Lzy?><%%123";
    
	/** 超级管理员ID */
	public static final int SUPER_ADMIN = 1;
    /**
     * 当前页码
     */
    public static final String PAGE = "page";
    /**
     * 每页显示记录数
     */
    public static final String LIMIT = "limit";
    /**
     * 排序字段
     */
    public static final String ORDER_FIELD = "sidx";
    /**
     * 排序方式
     */
    public static final String ORDER = "order";
    /**
     *  升序
     */
    public static final String ASC = "asc";

    /***********************
     * product产品相关
     **********************/

    /*************  redis   ******************/
    /**
     * 菜单缓存分区
     */
    public static final String CACHE_CATEGORY = "category";

    /**
     * 分类数据 锁
     */
    public static final String CATALOGJSON_LOCK = "CatelogJson-lock";
    /**
     * 分类数据
     */
    public static final String CATALOG = "catalog";

    /**
     * 层级
     */
    public static final Integer CAT_LEVEL1 = 1;
    public static final Integer CAT_LEVEL2 = 2;
    public static final Integer CAT_LEVEL3 = 3;

    /**
     * 一级分类
     */
    public static final Long CAT_PARENT_CID = 0L;

    /**
     * 菜单显示 1显示 0不显示
     */
    public static final Integer CAT_SHOW_STATUS = 1;
    public static final Integer CAT_NOT_SHOW_STATUS = 0;
    public static final Long NOT_PARENT = 0L;

    /**
     * 属性类型
     */
    public static final String ATTR_TYPE_BASE = "base";
    /**
     * 查询所有分类
     */
    public static final Long ALL_LIST_CAT_ID = 0L;
    /**
     * 查询所有条件id
     */
    public static final String ALL_LIST_ID = "0";

    /**
     * 商品属性是否可以被检索 0 不可以 1 可以
     */
    public static final Integer ATTR_IS_SEARCH = 1;
    public static final Integer ATTR_NOT_SEARCH = 0;



    /***********************
     * ware库存相关
     **********************/
    /**
     * 采购单状态：新建、已分配、已领取、已完成、有异常
     */
    public static final Integer WARE_STATUS_NEW = 0;
    public static final Integer WARE_STATUS_ASSIGNED = 1;
    public static final Integer WARE_STATUS_RECEIVED = 2;
    public static final Integer WARE_STATUS_FINISH = 3;
    public static final Integer WARE_STATUS_ERROR = 4;




    public enum MenuType {
        /**
         * 目录
         */
    	CATALOG(0),
        /**
         * 菜单
         */
        MENU(1),
        /**
         * 按钮
         */
        BUTTON(2);

        private int value;

        MenuType(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }
    
    /**
     * 定时任务状态
     * 
     * @author chenshun
     * @email sunlightcs@gmail.com
     * @date 2016年12月3日 上午12:07:22
     */
    public enum ScheduleStatus {
        /**
         * 正常
         */
    	NORMAL(0),
        /**
         * 暂停
         */
    	PAUSE(1);

        private int value;

        ScheduleStatus(int value) {
            this.value = value;
        }
        
        public int getValue() {
            return value;
        }
    }

    /**
     * 云服务商
     */
    public enum CloudService {
        /**
         * 七牛云
         */
        QINIU(1),
        /**
         * 阿里云
         */
        ALIYUN(2),
        /**
         * 腾讯云
         */
        QCLOUD(3);

        private int value;

        CloudService(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }

}
